package artifacts;

import java.util.Random;

import maze.*;

/**
 * @author Denis Toikka
 * Artifacts that player could collect.
 *
 */
public abstract class Artifact {
	
	/**
	 * Name of artifact.
	 */
	public String name = "artifact";
	/**
	 * Cost for reiting (in points).
	 */
	public int cost = 0;
	
	/**
	 * @return
	 * Returning cost of item.
	 */
	public int getCost() {
		return this.cost;
	}
	
	/**
	 * @param maze
	 * Randomly adding items to maze rooms.
	 */
	public static void addArtsToMaze(Maze maze) {
		for(Room room : maze.rooms) {
			room.items.clear();
			Random rnd = new Random();
			for(int x = 0; x < rnd.nextInt(3); x++) {
				Coin coin = new Coin();
				room.items.add(coin);
			}
			for(int x = 0; x < rnd.nextInt(3); x++) {
				Goblet goblet = new Goblet();
				room.items.add(goblet);
			}
			for(int x = 0; x < rnd.nextInt(2); x++) {
				Potion potion = new Potion();
				room.items.add(potion);
			}
		}
	}
	
	/**
	 * @param pl
	 * @return
	 * Function, when player gets item.
	 */
	public String gateArt(Player pl) {
		return "";
	}
}
